package com.material.buy.service.impl;

import java.util.List;
import com.material.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.material.buy.mapper.VipRechargeRecordMapper;
import com.material.buy.domain.VipRechargeRecord;
import com.material.buy.service.IVipRechargeRecordService;

/**
 * vip充值记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-05-07
 */
@Service
public class VipRechargeRecordServiceImpl implements IVipRechargeRecordService 
{
    @Autowired
    private VipRechargeRecordMapper vipRechargeRecordMapper;

    /**
     * 查询vip充值记录
     * 
     * @param id vip充值记录主键
     * @return vip充值记录
     */
    @Override
    public VipRechargeRecord selectVipRechargeRecordById(Long id)
    {
        return vipRechargeRecordMapper.selectVipRechargeRecordById(id);
    }

    /**
     * 查询vip充值记录列表
     * 
     * @param vipRechargeRecord vip充值记录
     * @return vip充值记录
     */
    @Override
    public List<VipRechargeRecord> selectVipRechargeRecordList(VipRechargeRecord vipRechargeRecord)
    {
        return vipRechargeRecordMapper.selectVipRechargeRecordList(vipRechargeRecord);
    }

    /**
     * 新增vip充值记录
     * 
     * @param vipRechargeRecord vip充值记录
     * @return 结果
     */
    @Override
    public int insertVipRechargeRecord(VipRechargeRecord vipRechargeRecord)
    {
        vipRechargeRecord.setCreateTime(DateUtils.getNowDate());
        return vipRechargeRecordMapper.insertVipRechargeRecord(vipRechargeRecord);
    }

    /**
     * 修改vip充值记录
     * 
     * @param vipRechargeRecord vip充值记录
     * @return 结果
     */
    @Override
    public int updateVipRechargeRecord(VipRechargeRecord vipRechargeRecord)
    {
        return vipRechargeRecordMapper.updateVipRechargeRecord(vipRechargeRecord);
    }

    /**
     * 批量删除vip充值记录
     * 
     * @param ids 需要删除的vip充值记录主键
     * @return 结果
     */
    @Override
    public int deleteVipRechargeRecordByIds(Long[] ids)
    {
        return vipRechargeRecordMapper.deleteVipRechargeRecordByIds(ids);
    }

    /**
     * 删除vip充值记录信息
     * 
     * @param id vip充值记录主键
     * @return 结果
     */
    @Override
    public int deleteVipRechargeRecordById(Long id)
    {
        return vipRechargeRecordMapper.deleteVipRechargeRecordById(id);
    }
}
